import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/skincheckTicket',
  component: Layout,
  redirect: '/skincheckTicket/index',
  name: 'skincheckTicket',
  meta: {
    title: '测肤券',
    icon: 'ri:coupon-2-line',
  },
  children: [
    {
      path: 'index',
      name: 'skincheckTicketIndex',
      component: () => import('@/views/skincheckTicket/index.vue'),
      meta: {
        title: '测肤券列表',
      },
    },
    {
      path: 'ticketDetail',
      name: 'skincheckTicketTicketDetail',
      component: () => import('@/views/skincheckTicket/detail.vue'),
      meta: {
        title: '测肤券配置',
        menu: false,
        activeMenu: '/skincheckTicket/index',
      },
    },
    {
      path: 'sentList',
      name: 'skincheckTicketSentList',
      component: () => import('@/views/skincheckTicket/sentList.vue'),
      meta: {
        title: '发券记录',
      },
    },
  ],
}

export default routes
